<?php
/**
 * Created by PhpStorm.
 * User: meiyun1
 * Date: 2017/3/8
 * Time: 下午5:54
 */

namespace App\Models\ActivityPrize;

use App\Contracts\Repositories\ActivityPrizeRepository;

class ActivityPrizeService
{
    private $activityPrizeRes;

    public function __construct(ActivityPrizeRepository $activityPrizeRepository)
    {
        $this->activityPrizeRes = $activityPrizeRepository;
    }

    public function create($data)
    {
        $actpri = new ActivityPrize($data);
        return $this->activityPrizeRes->create($actpri);
    }

    public function delete($conditions)
    {
        return $this->activityPrizeRes->deleteByConditions($conditions);
    }

    public function findList($conditions)
    {
        return $this->activityPrizeRes->findListByConditions($conditions);
    }
    public function update($params=[],$conditions)
    {
        return $this->activityPrizeRes->update($params,$conditions);
    }
    public function findOneByPrizeID($prize_id){
        return $this->activityPrizeRes->findOneByPrizeID($prize_id);
    }
}
